package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.IScheduleDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.Schedule;

public class ScheduleDao extends GenericDao implements IScheduleDao {
	private static final long serialVersionUID = 7624580188201194243L;

	@SuppressWarnings("unchecked")
	@Override
	public List<Schedule> getAllSchedule(BasicFilter filter) {
		Criteria criteria = criteriaAllSchedule(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllSchedule(BasicFilter filter) {
		return super.criteriaAllBasic(filter, Schedule.class);
	}	
	
	@Override
	protected String getTableName() {
		return "schedule";
	}
}
